package com.zsjp.alc.controller.superadmin;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zsjp.alc.constant.ZsjpErrorCode;
import com.zsjp.alc.entity.ErrorMessage;
import com.zsjp.alc.entity.PersonInfo;
import com.zsjp.alc.exception.ZsjpException;
import com.zsjp.alc.restresult.PersonInfoExecution;
import com.zsjp.alc.restresult.ZsjpResponseResult;
import com.zsjp.alc.service.LocalAuthService;
import com.zsjp.alc.service.PersonInfoService;
import com.zsjp.alc.utils.HttpServletRequestUtil;

@Controller
@RequestMapping("/superadmin")
public class PersonInfoController {
	@Autowired
	private PersonInfoService personInfoService;
	@Autowired
	private LocalAuthService localAuthService;
	/**
	 * 超级管理员登录
	 * 超级管理员只有登录，不能注册
	 * 
	 * */
	@RequestMapping(value = "/login", method = RequestMethod.POST)
	@ResponseBody
	private ZsjpResponseResult checkSuperAdmin(HttpServletRequest request, @RequestBody PersonInfo personInfo) throws ZsjpException{
		ZsjpResponseResult result = new ZsjpResponseResult();
		result = personInfoService.checkSuperAdmin(personInfo);
		return result;
	}
}
